<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>mbview - raster</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.mapbox.com/mapbox.js/v3.0.1/mapbox.js'></script>
<link href='https://api.mapbox.com/mapbox.js/v3.0.1/mapbox.css' rel='stylesheet' />
<script src='https://api.mapbox.com/mapbox.js/plugins/leaflet-hash/v0.2.1/leaflet-hash.js'></script>

<style>
  body {
    margin:0;
    padding:0;
    -webkit-user-select: none;
    background-position: 0px 0px, 10px 10px;
    background-size: 20px 20px;
    background-color: white;
    background-image: linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%, #eee 100%),linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%, #eee 100%);
  }
  #map { background: transparent; position:absolute; top:0; bottom:0; width:100%; }
</style>
</head>
<body>
<div id='map'></div>
<script>
  var source = '<%= Object.keys(sources)[0] %>';
  var center = [<%= center %>];

  L.mapbox.accessToken = '<%= accessToken %>';
  var map = L.mapbox.map('map').setView([center[1], center[0]], center[2]);
  var baselayer = L.tileLayer('http://b.tiles.mapbox.com/v4/mapbox.<%= basemap %>/{z}/{x}/{y}.png?access_token=<%= accessToken %>').addTo(map);
  var tilelayer = L.tileLayer('http://<%= host %>:<%= port %>/' + source + '/{z}/{x}/{y}.<%= format %>', { maxNativeZoom: <%= maxzoom %> }).addTo(map);
  var hash = L.hash(map);
</script>
</body>
</html>
